package br.ufc.pet.util.email;

import javax.annotation.ManagedBean;

@ManagedBean
public class EmailSender {
	
	private String email;
	private String password;
	private String subject;
	private String addressee;
	private String messageText;
	
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	
	public String getSubject() {
		return subject;
	}
	public void setSubject(String subject) {
		this.subject = subject;
	}
	public String getAddressee() {
		return addressee;
	}
	public void setAddressee(String addressee) {
		this.addressee = addressee;
	}
	public String getMessageText() {
		return messageText;
	}
	public void setMessageText(String messageText) {
		this.messageText = messageText;
	}
	
	public void sendEmails(){
		Sender sender = new Sender(getEmail(),getPassword());
		sender.send(subject,addressee,messageText);
	}
	
}
